package study.javabasic.communication.pipe;

import java.io.PipedOutputStream;

/**
 * Created by zhangshuhan on 2019/3/21.
 */
public class ThreadA implements Runnable {
    WriteData writeData;

    PipedOutputStream out;

    public ThreadA(PipedOutputStream out, WriteData writeData) {
        this.writeData = writeData;
        this.out = out;
    }

    @Override
    public void run() {
        writeData.writeDate(out, "hello world");
    }
}
